<!DOCTYPE html>
<!--[if IE 9]>         <html class="ie9 no-focus" lang="zh"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-focus" lang="zh"> <!--<![endif]-->
<head>
    <meta charset="utf-8">

    {block name="page-title"}<title>{$page_title|default='后台'} | {:config('web_site_title')}</title>{/block}

    <meta name="description" content="{:config('web_site_description')}">
    <meta name="author" content="caiweiming">
    <meta name="robots" content="noindex, nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=0">


    <!-- Stylesheets -->
    <!-- Page JS Plugins CSS -->
    {notempty name="_css_files"}
    {eq name="Think.config.minify_status" value="1"}
    <link rel="stylesheet" href="{:minify('group', $_css_files)}">
    {else/}
    {volist name="_css_files" id="css"}
    {:load_assets($css)}
    {/volist}
    {/eq}
    {/notempty}

    {notempty name="_icons"}
    {volist name="_icons" id="icon"}
    <link rel="stylesheet" href="{$icon.url}">
    {/volist}
    {/notempty}

    {block name="plugins-css"}{/block}

    <link rel="stylesheet" href="__LIBS__/sweetalert/sweetalert.min.css?v={:config('asset_version')}">
    <link rel="stylesheet" href="__LIBS__/magnific-popup/magnific-popup.min.css?v={:config('asset_version')}">
    <link rel="stylesheet" href="__ADMIN_CSS__/bootstrap.min.css?v={:config('asset_version')}">
    <link rel="stylesheet" href="__ADMIN_CSS__/dolphin.css?v={:config('asset_version')}" id="css-main">
    <link rel="stylesheet" href="__LIBS__/viewer/viewer.min.css?v={:config('asset_version')}">
    <link rel="stylesheet" href="__HOME_LIBS__/layui/css/layui.css?v={:config('asset_version')}">
    <link rel="stylesheet" href="__HOME_CSS__/base.css?v={:config('asset_version')}">

    {notempty name="extend_css_list"}
    {volist name="extend_css_list" id="vo"}
    {volist name="vo" id="v"}
    <link rel="stylesheet" href="{$v}?v={:config('asset_version')}">
    {/volist}
    {/volist}
    {/notempty}

    <!--插件css钩子-->
    {:hook('page_plugin_css')}

    <!--自定义css-->
    <link rel="stylesheet" href="__HOME_CSS__/custom.css?v={:config('asset_version')}">

    <!--页面css-->
    {block name="style"}{/block}
    {notempty name="_pop"}
    <style>
        #page-container.sidebar-l.sidebar-o {
            padding-left: 0;
        }
        .header-navbar-fixed #main-container {
            padding-top: 0;
        }
    </style>
    {/notempty}
    <!-- END Stylesheets -->

    <script src="__ADMIN_JS__/core/jquery.min.js?v={:config('asset_version')}"></script>
    <script>
        // url
        var dolphin = {
            'top_menu_url': '{:url("admin/ajax/getSidebarMenu")}',
            'theme_url': '{:url("admin/ajax/setTheme")}',
            'jcrop_upload_url': '{$jcrop_upload_url ? $jcrop_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "jcrop", "module" => request()->module()])}',
            'editormd_upload_url': '{$editormd_upload_url ? $editormd_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "editormd", "module" => request()->module()])}',
            'editormd_mudule_path': '__LIBS__/editormd/lib/',
            'ueditor_upload_url': '{$ueditor_upload_url ? $ueditor_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "ueditor", "module" => request()->module()])}',
            'wangeditor_upload_url': '{$wangeditor_upload_url ? $wangeditor_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "wangeditor", "module" => request()->module()])}',
            'wangeditor_emotions': "__LIBS__/wang-editor/emotions.data",
            'ckeditor_img_upload_url': '{$ckeditor_img_upload_url ? $ckeditor_img_upload_url : url("admin/attachment/upload", ["dir" => "images", "from" => "ckeditor", "module" => request()->module()])}',
            'WebUploader_swf': '__LIBS__/webuploader/Uploader.swf',
            'file_upload_url': '{$file_upload_url ? $file_upload_url : url("admin/attachment/upload", ["dir" => "files", "module" => request()->module()])}',
            'image_upload_url': '{$image_upload_url ? $image_upload_url : url("admin/attachment/upload", ["dir" => "images", "module" => request()->module()])}',
            'upload_check_url': '{$upload_check_url ? $upload_check_url : url("admin/ajax/check")}',
            'get_level_data': '{:url("admin/ajax/getLevelData")}',
            'quick_edit_url': '{$quick_edit_url ? $quick_edit_url : url("quickEdit")}',
            'aside_edit_url': '{$aside_edit_url ? $aside_edit_url : url("admin/system/quickEdit")}',
            'triggers': {:json_encode(isset($field_triggers) ? $field_triggers : [])}, // 触发器集合
        'field_hide': '{$field_hide|default=""}', // 需要隐藏的字段
                'field_values': '{$field_values|default=""}',
                'validate': '{$validate|default=""}', // 验证器
                'validate_fields': '{$validate_fields|default=""}', // 验证字段
                'search_field': '{:input("param.search_field", "")}', // 搜索字段
                // 字段过滤
                '_filter': '{$Request.param._filter ? $Request.param._filter : (isset($_filter) ? $_filter : "")}',
                '_filter_content': '{$Request.param._filter_content == '' ? (isset($_filter_content) ? $_filter_content : "") : $Request.param._filter_content}',
                '_field_display': '{$Request.param._field_display ? $Request.param._field_display : (isset($_field_display) ? $_field_display : "")}',
                '_field_clear': {:json_encode(isset($field_clear) ? $field_clear : [])},
        'get_filter_list': '{:url("admin/ajax/getFilterList")}',
                'curr_url': '{:url("", $Request.route)}',
                'curr_params': {:json_encode($Request.param)},
        'layer': {:json_encode(config("zbuilder.pop"))}
        };

        //额外的js点击事件
        var layui_func = {};
        //统计代码
        var stat_func = {};
        //初始化统计
        var stat_init_func = {};
    </script>


</head>

<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <!--顶部导航-->
        {php}$table_lists = [];$_pop_class = "style='display:none;'";{/php}
        {empty name="_pop"}
        {php}$_pop_class = "";{/php}
        {/empty}
        <div class="layui-header" {$_pop_class}>
            <div class="layui-header-left">
                <div class="logo"><img src="__HOME_IMG__/logo-signin.png" class="titleimg1"/></div>
                <div class="title">
                    <a>首页</a>
                    <a>看板</a>
                    <a>配置</a>
                </div>


                <i style="margin: 0 10px;" class="layui-icon layui-icon-prev" lay-mode="prev"></i>

                {if(!empty($_location[1]))}
                <div class="layui-tab layui-tab-brief" lay-allowClose="true" lay-filter="docDemoTabBrief">
                    <ul class="layui-tab-title">
                        <li class="layui-this">{$_location[1]['title']}<i class="layui-icon layui-icon-close layui-unselect layui-tab-close" onclick="window.location.href='{:url($_location[0]['url_value'])}';return false;"></i></li>

                    </ul>

                </div>
                {/if}
            </div>
            <div class="layui-header-right">
                <i style="margin: 0 10px;" class="layui-icon layui-icon-next" lay-mode="next"></i>

                <ul class="layui-header-more layui-nav">
                    <li class="layui-nav-item" lay-unselect>
                        {// 设置默认列表信息}
                        <a class="nav-on"><i class="iconfont mill-more" style="font-size: 1.5em"></i></a>

                        <dl class="layui-nav-child">
                            {notempty name="_sidebar_menus"}
                            {volist name="_sidebar_menus" id="menu"}

                            {// 设置默认列表信息}
                            {if($menu['id'] == $_location[0]['id'])}
                            {php}$table_lists = [$menu];{/php}
                            {/if}

                            {empty name="menu['online_hide']"}
                            <!--当前一级菜单-->
                            <!--{   $menu['id'] == $_location[0]['id'] ?= 'on'  }-->
                            <a class="a-box layui-col-md4" href="{$menu['url_value']}">
                                <div class="a-box-i">
                                    <i class="{$menu.icon}"></i>
                                </div>
                                <div>
                                    {$menu['title']}
                                </div>

                            </a>
                            {/empty}

                            {/volist}
                            {/notempty}
                        </dl>
                    </li>

                </ul>

                <div class="layui-header-user" style="flex-direction: column;">
                <span class="header-nickname">
                    {:session('user_auth.role_name')}
                </span>
                <span class="header-logout"><a href="{:url('mill/sign/signout')}">安全退出</a></span>
                </div>
            </div>
        </div>
<div class="main">
    <!--左侧导航-->
    {php}$table_lists2 = [];$hide_nav_left=false;$nav_left_ul_style = "";$hide_nav_left=false;{/php}
    {if($table_lists)}

    <!--如果有顶部统计，则增加高度-->
    {notempty name="$extra_html_block_top"}
    {empty name="_pop"}
    {php}$nav_left_ul_style = "style='top: 350px;'"{/php}
    {/empty}
    {/notempty}


    {// 一级导航}
    {volist name="$table_lists[0]['child']" id="submenu"}
    {empty name="submenu['online_hide']"}
    {// 判断是否有可显示的二级导航}
    {php}$is_submenu2=get_menu_child_to($submenu);{/php}
    {// 二级导航}
    {if($is_submenu2)}
    {// 有二级导航，则显示左侧菜单}
    {php}$hide_nav_left=true;{/php}
    {/if}
    {/empty}
    {/volist}


    <!--<div class="nav-left" {if(!$hide_nav_left || $_pop)}style="display: none;"{/if}>-->
    <div class="nav-left-old" style="display: none;">
        <ul class="layui-nav layui-nav-tree layui-nav-side" {$nav_left_ul_style}>

            {// 一级导航}
            {volist name="$table_lists[0]['child']" id="submenu"}

            {empty name="submenu['online_hide']"}
            <li class="layui-nav-item {if(isset($_location[1]) && $submenu['id'] == $_location[1]["id"])}layui-nav-itemed{/if}">
            {// 判断是否有可显示的二级导航}
            {php}$is_submenu2=get_menu_child_to($submenu);{/php}
            {if($is_submenu2)}
            <a class="item-border"><div class="nav-li-a">{$submenu.title}</div></a>
            {else /}
            <a class="item-border" {if($submenu.url_value)}href="{$submenu.url_value}" target="{$submenu.url_target}"{/if}><div class="nav-li-a">{$submenu.title}</div></a>
            {/if}


            {// 二级导航}
            {if($is_submenu2)}
            <dl class="layui-nav-child">
                {volist name="$submenu['child']" id="submenu2"}

                {empty name="submenu2['online_hide']"}

                <dd class="layui-nav-item {if(isset($_location[2]) && $submenu2['id'] == $_location[2]["id"])}on{/if}">
                <a href="{$submenu2.url_value}" target="{$submenu2.url_target}"><i class="{$submenu2.icon}"></i>{$submenu2.title}</a>
                </dd>

                {// 设置默认列表信息}
                {if(isset($_location[2]) && $submenu2['id'] == $_location[2]["id"])}
                {// 计数器，计数显示的列表}
                {php}$table_list_i = 0;{/php}
                {// 如果列表下全是隐藏的，则直接显示主体}
                {if(isset($submenu2['child']))}
                {volist name="submenu2['child']" id="submenu_list"}
                {empty name="submenu_list['online_hide']"}
                {php}$table_list_i ++;{/php}
                {/empty}
                {/volist}
                {/if}

                {// 如果显示的列表=0，则默认为主体}
                {if($table_list_i == 0)}
                {php}$table_lists2 = [$submenu2];{/php}
                {else /}
                {php}$table_lists2 = $submenu2['child'];{/php}
                {/if}

                {/if}

                {/empty}

                {/volist}
            </dl>
            {/if}

            </li>
            {/empty}

            {// 设置默认列表信息}
            {if(isset($_location[1]) && $submenu['id'] == $_location[1]["id"] && empty($table_lists2))}
            {// 计数器，计数显示的列表}
            {php}$table_list_i = 0;{/php}
            {// 如果列表下全是隐藏的，则直接显示主体}
            {if(isset($submenu['child']))}
            {volist name="submenu['child']" id="submenu_list"}
            {empty name="submenu_list['online_hide']"}
            {php}$table_list_i ++;{/php}
            {/empty}
            {/volist}
            {/if}

            {// 如果显示的列表=0，则默认为主体}
            {if($table_list_i == 0)}
            {php}$table_lists2 = [$submenu];{/php}
            {else /}
            {php}$table_lists2 = $submenu['child'];{/php}
            {/if}

            {/if}

            {/volist}

        </ul>
    </div>

    <!--左侧菜单-->
    {php}$hide_nav_left = false;{/php}
    {notempty name="tab_nav"}
    {php}$hide_nav_left = true;{/php}
    <div class="s_nav" >
        <div class="layui-side">
            <ul class="layui-nav layui-nav-tree">

                {volist name="tab_nav['tab_list']" id="tab"}

                <li class="layui-nav-item layui-nav-itemed {eq name="tab_nav.curr_tab" value="$key"}layui-this{/eq}">

                {notempty name="tab['child']"}
                <a class="item-border" ><div class="nav-li-a">{$tab.title|htmlspecialchars}</div></a>
                <?php $_pop2=1;$_tab_id=$key;?>
                <dl class="layui-nav-child">
                    {volist name="tab['child']" id="tab2"}
                    <dd class="layui-nav-item {eq name="tab_nav.curr_tab" value="$key"}on{/eq}">
                    <a href="{$tab2.url_value}{$_pop ?= '?_pop=1'}" target="{$tab2.url_target}"><i class="{$tab2.icon|htmlspecialchars}"></i>{$tab2.title|htmlspecialchars}</a>
                    </dd>
                    {/volist}
                </dl>
                {else /}
                <a class="item-border" href="{$tab.url_value}{$_pop ?= '?_pop=1'}" target="{$tab.url_target}"><div class="nav-li-a">{$tab.title|htmlspecialchars}</div></a>
                {/notempty}
                <!--<dl class="layui-nav-child">-->
                <!--<dd class="layui-nav-item"><a><i class="iconfont mill-youqi"></i>油漆</a></dd>-->
                <!--<dd class="layui-nav-item"><a><i class="iconfont mill-fenmo"></i>粉末</a></dd>-->
                <!--<dd class="layui-nav-item"><a><i class=""></i>转印纸</a></dd>-->
                <!--<dd class="layui-nav-item"><a><i class=""></i>铝卷</a></dd>-->
                <!--<dd class="layui-nav-item"><a><i class=""></i>板材</a></dd>-->
                <!--<dd class="layui-nav-item"><a><i class=""></i>型材</a></dd>-->
                <!--<dd class="layui-nav-item"><a><i class=""></i>化工</a></dd>-->
                <!--<dd class="layui-nav-item"><a><i class=""></i>生产物资</a></dd>-->
                <!--<dd class="layui-nav-item"><a><i class=""></i>办公物资</a></dd>-->
                <!--</dl>-->
                </li>

                {/volist}

            </ul>
        </div>

    </div>
    {/notempty}

    {if($table_lists2)}
    {php}$table_lists = $table_lists2;{/php}
    {/if}

    {/if}

    <!-- Page Content -->
    <div class="main">
        {// 顶部统计}
        {notempty name="$extra_html_block_top"}
        {empty name="_pop"}
        <div class="top s_center">
            {$extra_html_block_top|raw|default=''}
        </div>
        {/empty}
        {/notempty}

        {// 页面提示钩子}
        {:hook('page_tips')}
        {// 主体内容}
        {block name="content"}{/block}

    </div>
    <!-- END Page Content -->
</div>

{// 额外HTML代码 }
{$extra_html|raw|default=''}

    </div>
<!-- Footer -->
{empty name="_pop"}
<footer id="page-footer" style="display: none"></footer>
{/empty}
<!-- END Footer -->

<!-- OneUI Core JS: jQuery, Bootstrap, slimScroll, scrollLock, Appear, CountTo, Placeholder, Cookie and App.js -->
{eq name="Think.config.minify_status" value="1"}
<script src="{:minify('group', 'core_js,libs_js')}"></script>
{else/}
<script src="__ADMIN_JS__/core/bootstrap.min.js?v={:config('asset_version')}"></script>
<script src="__ADMIN_JS__/core/jquery.slimscroll.min.js?v={:config('asset_version')}"></script>
<script src="__ADMIN_JS__/core/jquery.scrollLock.min.js?v={:config('asset_version')}"></script>
<script src="__ADMIN_JS__/core/jquery.appear.min.js?v={:config('asset_version')}"></script>
<script src="__ADMIN_JS__/core/jquery.countTo.min.js?v={:config('asset_version')}"></script>
<script src="__ADMIN_JS__/core/jquery.placeholder.min.js?v={:config('asset_version')}"></script>
<script src="__ADMIN_JS__/core/js.cookie.min.js?v={:config('asset_version')}"></script>
<script src="__LIBS__/magnific-popup/magnific-popup.min.js?v={:config('asset_version')}"></script>
<script src="__ADMIN_JS__/app.js?v={:config('asset_version')}"></script>
<script src="__HOME_JS__/dolphin.js?v={:config('asset_version')}"></script>
<script src="__HOME_JS__/builder/form.js?v={:config('asset_version')}"></script>
<script src="__ADMIN_JS__/builder/aside.js?v={:config('asset_version')}"></script>
<script src="__HOME_JS__/builder/table.js?v={:config('asset_version')}"></script>
<script src="__LIBS__/bootstrap-notify/bootstrap-notify.min.js?v={:config('asset_version')}"></script>
<script src="__LIBS__/sweetalert/sweetalert.min.js?v={:config('asset_version')}"></script>
<script src="__LIBS__/js-xss/xss.min.js?v={:config('asset_version')}"></script>
<script src="__LIBS__/viewer/viewer.min.js?v={:config('asset_version')}"></script>

<script src="__HOME_LIBS__/layui/layui.js?v={:config('asset_version')}"></script>
{/eq}

<!-- Page JS Plugins -->
<script src="__HOME_JS__/echarts.min.js?v={:config('asset_version')}"></script>
<script src="__HOME_JS__/jquery.table2excel.js?v={:config('asset_version')}"></script>
<script src="__LIBS__/layer/layer.js?v={:config('asset_version')}"></script>
{notempty name="_js_files"}
{eq name="Think.config.minify_status" value="1"}
<script src="{:minify('group', $_js_files)}"></script>
{else/}
{volist name="_js_files" id="js"}
{:load_assets($js, 'js')}
{/volist}
{/eq}
{/notempty}

{notempty name="extend_js_list"}
{volist name="extend_js_list" id="vo"}
{volist name="vo" id="v"}
<script src="{$v}?v={:config('asset_version')}"></script>
{/volist}
{/volist}
{/notempty}

<script>
    jQuery(function () {
        App.initHelpers(['appear', 'slimscroll', 'magnific-popup', 'table-tools']);
        {notempty name="_js_init"}
        App.initHelpers({$_js_init|raw});
        {/notempty}
    });
</script>

<!--页面js-->
{block name="script"}{/block}

<!--插件js钩子-->
{:hook('page_plugin_js')}

</body>
</html>